//登录相关接口
import request from "@/utils/request";

//登录
export const loginAPI = data => {
    data = request.postForm(`/user/login`, data)
    return data
}
/** 登出 */
export const logoutAPI = () => {
    return request.post("/user/logout");
}

//手机号注册
export const registerByTelephoneApi = data => {
    return request({
        url: `/reginster/telephone/${data.verifyCode}`,
        method: 'POST',
        data: {
            telephone: data.telephone,
            email: data.email,
            password: data.password,
            authority: data.authority
        }
    })
}

//邮箱注册
export const registerByEmailApi = data => {
    return request({
        url: `/reginster/email/${data.verifyCode}`,
        method: 'POST',
        data: {
            telephone: data.telephone,
            email: data.email,
            password: data.password,
            authority: data.authority
        }
    })
}
